<%-- 
    Document   : register
    Created on : May 4, 2013, 1:52:05 PM
    Author     : phdinusa
--%>

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Dataflix - Register | Login</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <meta http-equiv="content-language" content="en" />
        <meta name="description" />
        <meta name="language" content="en" />
        <link type="text/css" rel="stylesheet" href="./css/style.css" />
    </head>
    <body>
        <form id="login_frm" name="login_frm" method="post" action="login.jsp">
            <table id="head">
                <tr>
                    <td>
                                <!--this one is not working-->
                                <table>
                                    <tr>
                                        <td>
                                            <a href="index.xhtml"><img style="margin-left:10%;" src="images/logo.png"/></a>
                                        </td>
                                    </tr>
                                </table>    
                    </td>
                    <td>
                        <table id="loginbox" style="width: 600px;">
                            <tr>
                                <td width="40%">
                                    <span style="font-size: 16px;">Already a member?</span>
                                    <br /><br />
                                    <span style="font-size: 16px;">Please sign in here!</span>
                                </td>
                                <td width="40%">
                                    <span style="font-size: 16px;">Email:</span>
                                    <br /><br />
                                    <!--<input id="login_frm:email" type="text" name="login_frm:email" class="login" />-->
                                    <input id="logEM" name="email"/>
                                </td>
                                <td width="40%" style="margin-left: 10px;">
                                    <span style="font-size: 16px;">Password:</span>
                                    <br /><br />
                                    <!--<input id="login_frm:password" type="password" name="login_frm:password" value="" class="password" />-->
                                    <input id="logPS" name="password" type="password"/>
                                </td>
                                <td width="20%">
                                    <!--<input type="submit" name="login_frm:j_idt10" value="Login" class="submit" />-->
                                    <input id="logBtn" type="submit" value="Sign In"/>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <div class="bottom"></div><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="4476425099840004477:2833575514460831692" autocomplete="off" />
        </form>
        
        
        
        
        <!--Add a new user -->
        <form id="j_idt12" name="j_idt12" method="post" action="newUser.jsp" enctype="application/x-www-form-urlencoded">
            
            
            
            <input type="hidden" name="j_idt12" value="j_idt12" />

            <center>
                
                <table id="mainTable">
                    
         
                    <tr>
                        <td>
                            <img src="images/indexmap.png" />
                        </td>
                        <td>
                            <table id="signup">
                                
                                   <%
                                        String error = request.getParameter("error");
                                        if(error!=null){
                                            if(error.equals("true")) {   
                                    %>
                                                <tr><td colspan="2" style="font-size:32px;">Try another email address!</td></tr>
                                    <%
                                            }else if(error.equals("password")) {
                                    %>
                                                <tr><td colspan="2" style="font-size:32px;">This passwords are not the same!</td></tr>
                                    <%
                                            }else if(error.equals("email")){
                                    %>
                                                <tr><td colspan="2" style="font-size:32px;">The email format is not correct!</td></tr>
                                    <%
                                            }
                                        }
                                    %>
                                   
                                <tr>
                                    <td id="siupupImg" colspan="2" >
                                        <!--<img style="margin-left: -8px; height: 70px; width:170px; margin-bottom: 20px" src="images/signUp.png" />-->
                                        <h1 style="font-size:32px;">Sign Up Here!</h1>
                                    </td>
                                </tr>
                                <tr>   
                                    <td width="80" align="left">
                                        <span style="font-size: 16px; margin-left:5px;">First:</span><br />
                                        <input id="j_idt12:firstname" type="text" name="j_idt12:firstname" class="input_text" />
                                    </td>
                                    <td width="80" align="left">
                                        <span style="font-size: 16px; margin-left:5px;">Last:</span><br />
                                        <input id="j_idt12:lastname" type="text" name="j_idt12:lastname" class="input_text" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="left">
                                        <span style="font-size: 16px; margin-left:5px;">Email:</span><br />
                                        <input type="text" name="j_idt12:j_idt16" autocomplete="off" class="input_long" />
                                    </td>    
                                </tr>
                                <tr>
                                    <td colspan="2" align="left">
                                        <span style="font-size: 16px; margin-left:5px;">Password:</span><br />
                                        <input type="password" name="j_idt12:j_idt18" autocomplete="off" value="" class="input_long" type="password" />
                                    </td>    
                                </tr>
                                <tr>
                                    <td colspan="2" align="left">
                                        <span style="font-size: 16px; margin-left:5px;">Enter the password again:</span><br />
                                        <input type="password" name="j_idt12:j_idt19" autocomplete="off" value="" class="input_long" type="password"/>
                                    </td>    
                                </tr>
                                <tr>
                                    <td colspan="2" align="left">
                                        <span style="font-size: 16px; margin-left:5px;">Credit Card Number</span><br />
                                        <input type="password" name="credit_card" autocomplete="off" value="" class="input_long" type="password"/>
                                    </td>    
                                </tr>
                                <tr>
                                    <td width="80" align="left">
                                        <input type="submit" name="j_idt12:j_idt20" value="submit" class="submit_add" />
                                    </td>    
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </center>
            <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="4476425099840004477:2833575514460831692" autocomplete="off" />
        </form>
    </body>
</html>
